//priority 48
/**
 * 倾向性类实现了怪物的倾向的函数
*/
function TypeEntry(name) {
    BaseEntry.call(this, name)
    this.DefaultConfig = {//默认配置文件
        "type0": {
            Color: 0x123456
        },
        "type1": {
            Color: 0x123456
        },
        "type2": {
            Color: 0x123456
        },
        "type3": {
            Color: 0x123456
        },
        "type4": {
            Color: 0x123456
        },
        "type5": {
            Color: 0x123456
        },
        "type6": {
            Color: 0x123456
        },
        "type7": {
            Color: 0x123456
        },
        "type8": {
            Color: 0x123456
        },
        "type9": {
            Color: 0x123456
        }
    }
}
// 建立原型链
TypeEntry.prototype = Object.create(BaseEntry.prototype);
TypeEntry.prototype.constructor = TypeEntry;

//获取类的本地化键值，arguments代表不定长参数
TypeEntry.prototype.getText = function () {
    if (arguments[0] > 10) arguments[0] = 0
    return Text.translate("rpg.monster.entry." + this.getName() + "." + arguments[0])
        .color(Color.of(this.Config["type" + arguments[0]].Color))
};

//怪物加载时候对怪物名称的修改
TypeEntry.prototype.ChangeName = function (nbt, name, monster, level) {
    name.splice(4, 0, this.getText(level), " ");//将词条等级放在名字前面稀有度后面
}

var a = new TypeEntry("type").init()
//注册技能自身
global.EntryHelper.RegisterEntry(a).AddToEntryGroup(a, "type_group")